package com.chat.service;

import com.chat.Local;
import com.chat.common.Group;
import com.chat.common.Message;
import com.chat.common.MessageType;
import com.chat.common.User;
import com.chat.view.VerifyData;

import static com.chat.view.GroupVerifyController.groupver;
import java.util.ArrayList;

/*
 获取群聊验证消息
 */
public class GetGroupVerify {
      public void getgroupverify(){
          Message msg=new Message();
          msg.setMesType(MessageType.MESSAGE_GET_GROUP_VERIFY);
          Group group=new Group();
          group.setId(Local.group.getId());
          msg.setData(group);
          ClientConnectServerThread clientConnectServerThread=ManageClientConnectServerThread.getClientConnectServerThread(Local.user.getUsername());
          clientConnectServerThread.send(msg);
      }
      public void setgroupverify(ArrayList<User> a){
              for(int i=0;i<a.size();i++){
                   groupver.add(new VerifyData(a.get(i).getNickname(),a.get(i).getUsername(),"1"));
              }
      }
}
